LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-24-2015, 02:24 PM   #1
l0p3n
LQ Newbie
 
Registered: Jul 2013
Distribution: Ubuntu
Posts: 27

Rep: Reputation: Disabled
Valid characters in /sys/class/rfkill/rfkill[0-9]+/name


I'm trying to write a regular expression to match an rfkill device name. The device name could for example be phy0 and can normally be found in /sys/class/rfkill/rfkill[0-9]+/name.

In order to write this regular expression I need to know the possible characters in an rfkill device name found in /sys/class/rfkill/rfkill[0-9]+/name. kernel.org tells us that the name is an arbitrary string (https://www.kernel.org/doc/Documenta...s-class-rfkill). Is it then wrong to assume that this string could be made up of any character (for example even :^❤ ☀ ☆ ☂ ☻ ♞ ☯ ☭ ☢ €)?

Thanks in advance!

Last edited by l0p3n; 07-24-2015 at 02:29 PM.
 
Old 07-25-2015, 09:30 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by l0p3n View Post
I'm trying to write a regular expression to match an rfkill device name. The device name could for example be phy0 and can normally be found in /sys/class/rfkill/rfkill[0-9]+/name.
this worx on my system:
Code:
[liveuser@localhost lq-iso]$ ll  /sys/class/rfkill/rfkill[0-9]*/name
-r--r--r--. 1 root root 4096 Jul 25 10:26 /sys/class/rfkill/rfkill0/name
Quote:
Originally Posted by l0p3n View Post
In order to write this regular expression I need to know the possible characters in an rfkill device name found in /sys/class/rfkill/rfkill[0-9]+/name. kernel.org tells us that the name is an arbitrary string (https://www.kernel.org/doc/Documenta...s-class-rfkill). Is it then wrong to assume that this string could be made up of any character (for example even :^❤ ☀ ☆ ☂ ☻ ♞ ☯ ☭ ☢ €)?

Thanks in advance!
not sure but unlikely a human would write something unintelligible unless they are purposely trying to obfuscate something.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] wlan0 is in ifconfig but rfkill fails MisterBark Linux - Wireless Networking 3 01-09-2015 01:04 PM
inspecting on rfkill at boot with Broadcom WIFI dariodee Slackware 5 07-21-2014 02:49 PM
[SOLVED] rfkill anyone? barnac1e Linux - Newbie 4 04-06-2012 06:43 AM
rfkill Issue Adriann SUSE / openSUSE 1 12-16-2011 07:02 PM
[current] rfkill upgraded? conraid Slackware 3 01-22-2011 12:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration